home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-10-28 | 3.3 KB | 145 lines |
- /*
- A basic extension of the java.awt.Frame class
- */
-
- import java.awt.*;
-
- import geo.emblaze.*;
- import geo.emblaze.Emblaze20;
- public class EmblazeClass extends Frame
- {
- public EmblazeClass()
- {
- // This code is automatically generated by Visual Cafe when you add
- // components to the visual environment. It instantiates and initializes
- // the components. To modify the code, only use code syntax that matches
- // what Visual Cafe can generate, or Visual Cafe may be unable to back
- // parse your Java file into its visual environment.
- //{{INIT_CONTROLS
- setLayout(null);
- setBackground(java.awt.Color.black);
- setSize(600,458);
- setVisible(false);
- try {
- emblaze201.setFileURL(symantec.itools.net.RelativeURL.getURL("blaze/symantec.blz"));
- }
- catch (java.net.MalformedURLException error) { }
- add(emblaze201);
- emblaze201.setBounds(27,23,543,339);
- button1.setActionCommand("button");
- button1.setLabel("Close");
- add(button1);
- button1.setBounds(136,385,60,40);
- button2.setActionCommand("button");
- button2.setLabel("Start");
- add(button2);
- button2.setBounds(270,385,60,40);
- button3.setActionCommand("button");
- button3.setLabel("Pause");
- add(button3);
- button3.setBounds(404,385,60,40);
- setTitle("Untitled");
- //}}
-
- //{{INIT_MENUS
- //}}
-
- //{{REGISTER_LISTENERS
- SymWindow aSymWindow = new SymWindow();
- this.addWindowListener(aSymWindow);
- SymAction lSymAction = new SymAction();
- button1.addActionListener(lSymAction);
- button2.addActionListener(lSymAction);
- button3.addActionListener(lSymAction);
- //}}
- }
-
- public EmblazeClass(String title)
- {
- this();
- setTitle(title);
- }
-
-
-
-
-
- // Used for addNotify check.
- boolean fComponentsAdjusted = false;
-
- //{{DECLARE_CONTROLS
- geo.emblaze.Emblaze20 emblaze201 = new geo.emblaze.Emblaze20();
- java.awt.Button button1 = new java.awt.Button();
- java.awt.Button button2 = new java.awt.Button();
- java.awt.Button button3 = new java.awt.Button();
- //}}
-
- //{{DECLARE_MENUS
- //}}
-
- class SymWindow extends java.awt.event.WindowAdapter
- {
- public void windowClosing(java.awt.event.WindowEvent event)
- {
- Object object = event.getSource();
- if (object == EmblazeClass.this)
- Frame1_WindowClosing(event);
- }
- }
-
- void Frame1_WindowClosing(java.awt.event.WindowEvent event)
- {
- // hide(); // hide the Frame
- dispose();
- }
-
- class SymAction implements java.awt.event.ActionListener
- {
- public void actionPerformed(java.awt.event.ActionEvent event)
- {
- Object object = event.getSource();
- if (object == button1)
- button1_Action(event);
- else if (object == button2)
- button2_Action(event);
- else if (object == button3)
- button3_Action(event);
- }
- }
-
- void button1_Action(java.awt.event.ActionEvent event)
- {
- // to do: code goes here.
-
- //{{CONNECTION
- // Hide the Frame
- setVisible(false);
- dispose();
- //}}
- }
-
- void button2_Action(java.awt.event.ActionEvent event)
- {
- // to do: code goes here.
-
- //{{CONNECTION
- // Start the animation
- {
- emblaze201.start();
- }
- //}}
- }
-
- void button3_Action(java.awt.event.ActionEvent event)
- {
- // to do: code goes here.
-
- //{{CONNECTION
- // Pause the animation
- {
- emblaze201.freeze();
- }
- //}}
- }
- }
-